<template>
    <div class="breadcrumb">
        <span  class="title">总后台管理:&nbsp;</span>
        <el-breadcrumb separator-class="el-icon-arrow-right">
         <el-breadcrumb-item v-for="(item,index) in breadcrumbList" :key="index"><span @click="handle(item)">{{item.name}}</span></el-breadcrumb-item>
       </el-breadcrumb>
       <span  @click="handle(1)" v-if="showtitle" class="title">--{{title}}</span>
    </div>
</template>
<script>
export default {
    props:{
        breadcrumbList:{
            type:Array,
            default:[]
        },
        title:{
            type:String,
            default:''
        },
        showtitle:{
            type:Boolean,
            default:false
        }
    },
    data(){
        return {}
    },
    methods:{
        
            handle(val){
                console.log(val);
                if(val.name=="机构管理" ) {
                    this.$parent.show =1
                     this.$parent.breadcrumbList=[{name:"机构管理"}]
                      this.$parent. showtitle = false
                }
            }
        
    }
    
}
</script>
<style lang="less" scoped>
.breadcrumb {
    background-color: #F3F3F3;
    margin-bottom: 10px;
    display: flex;
    height: 40px;
    line-height: 47px;
    align-items: center;
    .title{
        margin-top: -2px;
        font-size: 14px;
        color: #5F5F5F;
    }
    /deep/.el-breadcrumb__inner {
        color: #333333;

    }
    /deep/ .el-breadcrumb {
    font-size: 14px;
    // line-height: -1;
    line-height: 2;
     }
}
</style>